const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    theme:'',
    lists: [],
  },
    /**
     * 生命周期函数--监听页面加载
     */
     onLoad(options) {
      var that = this;
      wx.request({
          url: app.globalData.domain + 'v4/index/service',
          method: 'post',
          data: {
           
          },
          success (res) {
              if (res.data.code == 0) {
                for (var i = 0; i < res.data.data.img.length; i++) {
                  that.data.lists.push(res.data.data.img[i]);
                }
              that.setData({
                lists:  that.data.lists,
                text:res.data.data.text,
              });
              }
              console.log('debug::', res);
          }
        })
  },
  onShow: function () {
    if(wx.getStorageSync('theme') == 'style1'){
      this.setData({
        theme:'style1',

      })
  }else{
      this.setData({
        theme:'init',
      })
  }
},
 
})